﻿using DramaEnglish.WPF.ViewModels;
using Open.Infrastructure.Http;
using Prism.Commands;
using Prism.Events;
using Prism.Regions;
using Prism.Services.Dialogs;
using System.Linq;
using System.Net.Http;
using System.Windows.Controls;

namespace BlueCat.ViewModels.Header
{
    public class HeaderViewModel :  ViewModelBase
    {

        #region Fields

        #endregion

        #region Properties

        #endregion

        #region Constructors
        public HeaderViewModel(IRegionManager regionManager, IDialogService dialogService, IEventAggregator ea, HttpClientBase client)
           : base(regionManager, dialogService, ea)
        {
        }
        #endregion

        #region Cammands
        public DelegateCommand GotoStudyListCommand => new(() =>
        {
            
            var view = RegionManager.Regions["MainShell"].Views.FirstOrDefault(r => (r as UserControl).ToString().EndsWith(".StudyList"));
            RegionManager.Regions["MainShell"].Activate(view);
        });
        #endregion

        #region Functions Methods

        #endregion 
    }
}
